<?php


namespace App\Modules\Admin\Entities\System;


use App\Models\Model;

class Area extends Model
{
    protected $primaryKey = 'id';
    public $timestamps = FALSE;
    public function getSelectLists($where =[])
    {
        $first = ['id','id as value','parent_id','name as  label','code'];
        return list_to_tree($this->where(['is_hidden'=>1])->get($first)->toArray(),'id','parent_id','children');
    }


}